<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>11-DOM 样式操作</title>
    <script>
        window.onload=function () {
            let divEle = document.getElementById("d1");
            divEle.style.width="200px";
            divEle.style.height="200px";
            divEle.style.border="1px red solid";
            divEle.style.backgroundColor="pink";
            divEle.style.position="absolute";
        }
    </script>
</head>
<body>
<div id="d1" style="position: absolute">盒子1</div>
</body>
</html>